<div class="step1">
    <div class="important">
        为了确保实时到账，充值成功后，请等待页面自动返回，不要手工关闭。
    </div>

    <table class="center-table-form">
        <tr>
            <td class="label">存款金额：</td>
            <td class="field">
                <input type="number" name="amount" placeholder="输入存款金额，单位：元" 
                        class="am-form-field" required/>
            </td>
            <td class="clue2">
                * 单笔下限<span class="red min">0</span>，单笔上限<span class="red max">0</span>
            </td>
        </tr>

        <tr>
            <td class="label">转账时间：</td>
            <td class="field">
                <input type="text" name="time" class="am-form-field" placeholder="" data-am-datepicker readonly />
            </td>
            <td class="clue2">
            </td>
        </tr>
    </table>
</div>

<style type="text/css">
.bankinfo img {
    width: 100px;
    height: 100px;
    border: 1px solid #ccc;
    border-radius: 8px;
}
.bankinfo .qrcode {
    padding: 10px 0px 10px 0px;
}
</style>

<script>
    $(function() {
        $("input[name='time']").datetimepicker({
            format: "yyyy-mm-dd hh:ii:ss"
        });
        $("input[name='time']").val(new Date().Format("yyyy-MM-dd HH:mm:ss"));
    });
    $(".charge-c .img img").attr("src", "../public/all/images/charge_step_bank.jpg");

    Classify.query("eddy.pay.thh", "min", false, '0', function(r) {
        $(".clue2 .min").html(r);
    });
    Classify.query("eddy.pay.thh", "max", false, '0', function(r) {
        $(".clue2 .max").html(r);
    });

    $(".btn-next").click(function() {
        var amount = $("input[name='amount']").val().trim();
        if (amount == '' || parseInt(amount) < parseInt($("span.min").html()) || 
            parseInt(amount) > parseInt($("span.max").html())) {
            alert2("存款金额不对！", true);
            return;
        }
        CMD.post("/pay/thh/create", {
            amount: amount * 100,
        });
    });
</script>